package com.andnnl.num;

import cn.hutool.core.util.NumberUtil;

import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;

/**
 * Created by chenss on 2021/4/13.
 */
public class ParseLongTest {
    public static void main(String[] args) {
        //转换成long列表
        List<String> mobileList=Arrays.asList("123klasdf","1234123");
        List<Long> mobile=mobileList.stream().filter(NumberUtil::isLong).map(NumberUtil::parseLong).collect(Collectors.toList());
        System.out.println(mobile);

    }
}
